#pragma once

#include "adalog/LogAppender.h"
#include "adalog/LogEvent.h"
#include "adalog/LogFormatter.h"
#include <fstream>
#include <filesystem>

namespace adalog
{
    class FileAppender : public LogAppender
    {
    public:
        explicit FileAppender(const std::filesystem::path& file_path);
        ~FileAppender();
        void Append(const char* data, size_t len) override;

    private: 
        std::filesystem::path file_path_;
        std::ofstream os_;
    };
} // namespace adalog